# # # 银行存钱问题
# #
# # # principal = float(input("请输入你的本金："))
# # # target_money = float(input("请输入你的目标存款："))
# # # year = 0
# # # while True:
# # #     year +=1
# # #     print("====第{0}年的利息为{1}".format(year, principal*0.05))
# # #     principal += principal * 0.05
# # #     print(f"本金加利息={principal}")
# # #     if principal >= target_money:
# # #         print(f"{year}年后可以达到你的目标")
# # #         break
# #
# #
# #
# # # 2.空气质量查询程序
# #
# # # print("====空气质量查询工具====")
# # # #选择是否进入系统1进入，Q 退出
# # # in_put = input("按1进入系统,按Q退出:")
# # # if in_put == "1":
# # #   while True:
# # #       pm = input("请输入pm2.5的数值:")
# # #       if '0' <= pm <= '50':
# # #           print("空气质量：优")
# # #       elif '51' <= pm <= '100':
# # #           print("空气质量：良")
# # #       elif '101' <= pm <= '150':
# # #           print("空气质量：轻度污染")
# # #       elif '150' <= pm <= '200':
# # #           print("空气质量：中度污染")
# # #       elif '201' <= pm <= '300':
# # #           print("空气质量：重度污染")
# # #       elif pm > '300':
# # #           print("空气质量：严重污染")
# # #       in_put = input("任意键继续输入，按Q 退出：")
# # #       if in_put == 'Q' or in_put == 'q':
# # #           print("程序退出")
# # #           break
# # #
# # # else:
# # #  print("系统退出")
# #
# # # 3.猜大小游戏
# #
# # import random
# # while 1:
# #     num1 = random.randint(1, 6)
# #     num2 = random.randint(1, 6)
# #     num3 = random.randint(1, 6)
# #     num= num1 + num2 + num3
# #     if 3 <= num <= 10:
# #         reslut = '小'
# #     else:
# #         reslut =  "大"
# #     #次数
# #     count = 0
# #     #金币
# #     money = 1000
# #     in_put = input("按1开始，输入exit退出:")
# #     if in_put == '1':
# #       count += 1
# #       my_guess = input("请判断大还是小:")
# #       if my_guess == reslut:
# #           print("你赢了，获得100个金币")
# #           money +=100
# #           print(f"你的金币数量为{money}")
# #       else:
# #           print("你输了，扣除100个金币")
# #           money -=100
# #           print(f"你的金币数量为{money}")
# #       if money < 100:
# #               print("您的金币小于100，无法继续游戏")
# #               break
# #     else:
# #         print("退出")
# #         break
# #
# #
# #
# #
# #
# #
# #
# #
# # # # 4.根据分数定等级
# # # while 1:
# # #    score = (input("请输入你的分数(0-100)："))
# # #    if score.isdigit() == False:
# # #        print("您输入的不是数字，请从新输入")
# # #        continue
# # #    elif score.isdigit() and  0 <= int(score)  <= 100:
# # #      if 0 <= int(score)  < 60:
# # #       print("成绩不合格")
# # #      elif 60 <= int(score)  < 85:
# # #       print("成绩良好")
# # #      elif 85 <= int(score)  <= 100:
# # #       print("成绩优秀")
# # #    else:
# # #        if int(score)  < 0:
# # #            print("您输入的数值小于0，请重新输入")
# # #            continue
# # #        elif int(score)  > 100:
# # #            print("您输入的数值大于100，请重新输入")
# # #            continue
# # #
# #
# #
# #
# #
# #
# #
# #
# # lst = [585, 6888, 557]
# # print(lst)
# # print("拼接:", " ".join(lst))
#
# a = ["apple", "orange", 123, 0.11, "cali"]
# # #slice1 = slice(1)
# # print(a[1::])
# # slice2 = slice(2, 6)
# # print(a[slice2])
# # slice3 = slice(1,3)
# # print(a[slice3])
# # print(a[0],a[-1])
# # print(a[::])
# # print(a[1:2])
# # a[1:2] = "qwe"
# # print(a)
# # a = [1,2]
# # b = a
# # b.append(3)
# # print(a,b)
# # for j in enumerate(a):
# #     print(j)
# #
# # for i,j in enumerate(a):
# #     print(i, "-->", j, "--")
# lis1 = ['python', 'java', 'C']
# lis1.append('我是追加')
# print(lis1)
# print("删除第一个元素和最后一个元素：")
# del lis1[0],lis1[-1]
# print(lis1)
# if "Cali" in lis1:
#     print("yes")
# else:
#     print("no")
# print(len(lis1))
# lis1.insert(1,['liu','cali', 123,456])
# print(lis1)
# print("yes" if "cali" in lis1 else " no")
# s = 'sfafsf'
# a = tuple(s)
# print(a)
# i = 0
# while True:
#  print("######欢迎使用用户检测系统######")
#  user_list = [('root', '123456'), ('admin', 'admin')]
#  username = input("请输入用户名：")
#  passwd = input("请输入你的密码：")
#  if (username == user_list[0][0] and passwd == user_list[0][1]) or (username == user_list[1][0] and passwd == user_list[1][1]):
#   print("登入成功")
#   break
#  elif (username != user_list[0][0] and passwd == user_list[0][1]) or (username != user_list[1][0] and passwd == user_list[1][1]):
#     print("用户名错误")
#  else:
#     print("密码错误")
#  i+=1
#  if i > 3:
#      print("输入超过三次，无法登入")
#      break
# dict1 = {'a':1, 'b':2, "c":3}
# print(dict1['a'])
#
# #修改
# dict1["a"] = 5
# #新增
# dict1["e"] = 3
# print(dict1)
# print(dict1.get('g',8))

# def add(a,b):
#     print("a+b=", a+b)
#
# add(2, 4)
# def add(a,b):
#     print(f"a和b的值为:{a+b}")
#     return a+b
# c = add(1,3)
# print(c)

#匿名函数
# testlambda = lambda *x:x[0]*x[1]
# print(testlambda(1,2,6))
# a = [-10,1,-3,0,4,6]
# print(sorted(a, key= lambda x: x if x>0 else -x))
# def key2(x):
#     if x>0:
#         return x
#     else:
#         return -x
# print(sorted(a , key= key2))

# str1 = "asfaafimlslllffoacccfsokg"
# myset = set(str1)
# print(myset)
# for i in myset:
#     print(i,str1.count(i))

# lis1 = []
# print(lis1)
# def fd(n):
#     if n==1 or n==2:
#         return n
#     else:
#         return fd(n-1)+fd(n-2)
# print(fd(10))
# staff_list = ['哪吒', '孙悟空', '玉皇大帝', '王母娘娘']
# win_set = {'孙悟空','哪吒' '玉皇大帝', '王母娘娘'}
# # if win_set == set(staff_list):
# #  print(win_set - set(staff_list))
# for i in staff_list:
#  print(i)

# import requests
# 动态导入
# 接受一个string类型： 可以根据变量具体的值，来导入相应的模块
# import importlib
# mod = input("请输入你要导入的模块：")
# math2 = importlib.import_module(mod)
# print(math2.sqrt(9))
#

# 使用with语句关键字管理open
# with open('test.txt','r') as f:
#     for i in f:
#         print(i )
# with open("test.txt",'rb') as fp:
#     # print(fp.read())
#     fp.seek(-12,2)
#     print(fp.read().decode("utf-8"))
with open("test.txt",'r+',encoding="utf-8") as fp:
    for i in fp:
        str1 = fp.readline()
        if str1[0] != '#':
            print(str1)